<template>
  <div class="mine">
    <van-cell-group>
      <van-cell :title="userInfo.nickname || '用户名'" is-link />
    </van-cell-group>

    <van-cell-group style="margin: 10px 0;">
      <van-cell title="安全设置" is-link />
      <van-cell title="消息设置" is-link />
    </van-cell-group>

    <van-cell-group>
      <van-cell title="通用设置" is-link />
      <van-cell title="意见反馈" is-link />
      <van-cell title="关于" is-link />
    </van-cell-group>
    <van-button type="warning" size="large"
                @click="logout">退出登录
    </van-button>
  </div>
</template>

<script>
  import oauthLoginUtil from '@/utils/oauthLoginUtil'
export default {
  name: "mine",
  data() {
    return {
      userInfo: this.$store.state.userInfo || {}
    };
  },
  methods: {
    logout() {
      oauthLoginUtil.logout()
      this.$store.dispatch('FedLogOut').then(() => {
        this.$router.replace('/login')
      })
    }
  }
};
</script>

<style lang="scss" scoped>
.mine {
}
</style>
